package timing.ukulele.third.convertor.msg;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import timing.ukulele.common.data.DtoBaseDataConverter;
import timing.ukulele.data.third.data.msg.ChannelAccountGroupDTO;
import timing.ukulele.data.third.view.msg.ChannelAccountGroupVO;
import timing.ukulele.third.persistent.msg.ChannelAccountGroup;

@Mapper
public interface ChannelAccountGroupConverter extends DtoBaseDataConverter<ChannelAccountGroup, ChannelAccountGroupDTO, ChannelAccountGroupVO> {

    ChannelAccountGroupConverter INSTANCE = Mappers.getMapper(ChannelAccountGroupConverter.class);

    @Override
    @Mappings({
            @Mapping(target = "createBy", ignore = true),
            @Mapping(target = "createTime", ignore = true),
            @Mapping(target = "updateBy", ignore = true),
            @Mapping(target = "updateTime", ignore = true),
    })
    ChannelAccountGroup v2p(ChannelAccountGroupVO vo);

    @Override
    ChannelAccountGroupVO p2v(ChannelAccountGroup po);

}
